<!--
* @description 
* @fileName gameInfoEdit.vue
* @author huangyu
* @date 2023/02/16 10:53:12
!-->
<template>
   <div>
        <wangEditor v-model="gameModel.contact"></wangEditor>
        <div style="margin-top:20px;">
            <el-button type="primary" @click="submit" style="padding:20px 100px;">保存</el-button>
        </div>
   </div>
</template>

<script>
import { get } from '@/common/app.js'
import wangEditor from "@/components/system/wangEditor.vue"
export default {
    components: { wangEditor },
    data() {
        return {
            gameModel: {},
            powerRoleGM: this.$power.roleAction('GM'),
            powerRoleAdmin: this.$power.roleAction('admin'),
        }
    },
    mounted() {
        this.getData()
    },
    methods: {
        getData(){
            let params = {
                type: 'getContact',
                data: {
                    type: 'detail',
                },
            }
            get('game', params).then(res => {
                if (res) {
                    this.gameModel = res.data[0]
                }
            })
        },
        submit(){
            let params = {
                type: 'getContact',
                data: this.gameModel,
            }
            get('game', params).then(res => {
                if (res) {
                    this.$message.success("保存成功")
                }
            })
        },
    },
};
</script>

<style>
</style>